Skip to content

Conversation

@ferenc-csaky
Copy link
Contributor

@ferenc-csaky ferenc-csaky commented Oct 26, 2025

Key changes

  • Flink config now supports duration strings (3h, 2m etc), so made duration-like configs like that where it made sense
  • Pulsar 3.0.5 is the last version where the client has the same API, which is quite old now, but I wanted to limit the changes here, we can bump it in a separate change with someone that has more Pulsar exp

@boring-cyborg
Copy link

boring-cyborg bot commented Oct 26, 2025

Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html)

@ferenc-csaky ferenc-csaky changed the title [FLINK-38545] Update to Flink 1.20 and Pulsar 3.0.2 with callbacks [FLINK-38545] Update to Flink 1.20.3 and Pulsar 3.3.9 Oct 26, 2025
@ferenc-csaky ferenc-csaky force-pushed the FLINK-38545 branch 2 times, most recently from a5765ca to 536ec46 Compare October 26, 2025 07:57
@ferenc-csaky ferenc-csaky changed the title [FLINK-38545] Update to Flink 1.20.3 and Pulsar 3.3.9 [FLINK-38545] Update to Flink 1.20.3 and Pulsar 3.0.5 Oct 26, 2025
Copy link

@Poorvankbhatia Poorvankbhatia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just added one nit. Thanks.

*/
public int getFetchOneMessageTime() {
return fetchOneMessageTime;
return (int) fetchOneMessageTime;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The fetchOneMessageTime field is stored as long but cast to int in the getter, can it risk overflow for large Duration values? Should we add: Add validation to reject values > Integer.MAX_VALUE , or can we make this Duration too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Cannot do much about this, as the pulsar client requires an int value for this, and Duration.toMillis() return a long. I don't think there can be any case, where someone types in a duration that turns into a bigger number than Integer.MAX_VALUE. Since I can type in durations like 5d, having an explicit check that says you need to type in a lower number than 2147483647 would be more helpful than the cast exception.

Well, we could leave this as an int, but it is much better UX to be able to write duration strings than raw millis, so I would consider the current state better then it was before.

@ferenc-csaky ferenc-csaky merged commit 08c8e2e into apache:main Oct 27, 2025
5 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 27, 2025

Awesome work, congrats on your first merged pull request!

@ferenc-csaky ferenc-csaky deleted the FLINK-38545 branch October 27, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants